package com.ruoyi.system.service;

import com.ruoyi.system.domain.StorySysEmployee;
import com.ruoyi.system.domain.SysEmployee;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface StorySysEmployeeService {

//    /**
//     * 根据KEY_ID查询IM_ACCOUNT
//     * @param keyId
//     * @return
//     */
//    String getStuImByKeyId(String keyId);
//
//    /**
//     * 根据KEY_ID查询IM_ACCOUNT
//     * @param keyId
//     * @return
//     */
//    String getEmpImByKeyId(String keyId);

    /**
     * 插入
     * @param storySysEmployee
     * @return
     */
    public int insertStoryAndSysEmployee(StorySysEmployee storySysEmployee);



    public List<StorySysEmployee> selectNameAndOpinionById(String storyId, int transferNumber);


    /**
     * 确定小事说移交的次数
     * @param storyId
     * @return
     */
    public int determineTransferNumber(int storyId);

    /**
     * 根据id和移交次数查询回复信息
     * @param storyId
     * @param transferNumber
     * @return
     */
    public List<StorySysEmployee> selectReply(int storyId, int transferNumber);

    /**
     * 设置退回状态
     * @param storyId
     * @param transferNumber
     * @return
     */
    public int updateBack(int storyId, int transferNumber);

    /**
     * 查询第一次移交的审核意见
     * @param storyId
     * @return
     */
    String selectOpinion(@Param("storyId") int storyId);

    /**
     * 更新移交信息的状态为已完成状态2
     * @param replyId
     * @return
     */
    int updateReplyState(int replyId, int isBack);

    /**
     * 根据移交信息的状态来更新小事的状态
     * @return
     */
    int updateHandleState(int storyId, int replyId, int handleState, int isBack, int transferNumber);


    /**
     * 催办
     * @param storyId
     * @param transferNumber
     */
    void cuiBan(String storyId, int transferNumber);
}
